package com.demo.shiroDemo06.config;

import com.demo.shiroDemo06.handle.SessionIdHandler;
import com.demo.shiroDemo06.web.AdminController;
import com.demo.shiroDemo06.web.LoginController;
import com.demo.shiroDemo06.web.UserController;
import com.jfinal.config.Constants;
import com.jfinal.config.Handlers;
import com.jfinal.config.Interceptors;
import com.jfinal.config.JFinalConfig;
import com.jfinal.config.Plugins;
import com.jfinal.config.Routes;
import com.jfinal.render.ViewType;

public class DemoConfig extends JFinalConfig {

	@Override
	public void configConstant(Constants me) {
		me.setDevMode(true);
		me.setViewType(ViewType.JSP);
	}

	@Override
	public void configHandler(Handlers me) {
		me.add(new SessionIdHandler());
	}

	@Override
	public void configInterceptor(Interceptors me) {
		// TODO Auto-generated method stub

	}

	@Override
	public void configPlugin(Plugins me) {
		// TODO Auto-generated method stub

	}

	@Override
	public void configRoute(Routes me) {
		me.add("login", LoginController.class);
		me.add("user", UserController.class);
		me.add("admin", AdminController.class);
	}

}
